package com.coachtam.sjcar.web;

import com.coachtam.sjcar.pojo.Route;
import com.coachtam.sjcar.service.RouteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Copyright (C), 2018-2019
 * @Author: JAVA在召唤
 * @Date: 2019-09-12 16:36
 * @Description:
 */
@RestController
@RequestMapping("/route")
public class RouteController {
    @Autowired
    private RouteService routeService;

    @GetMapping("/newest")
    public List<Route> newest()
    {
        return routeService.findNewest();
    }
}
